package com.easylinkin.linkappapi.gaodemap.service;

import com.easylinkin.linkappapi.gaodemap.entity.*;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * class info :高德地图API接口服务
 *
 * @author liuqihang
 * @date 2021/6/24 11:05
 */
public interface GaoDeApiService {

    /**
     *获取逆地理编码数据 经纬度数据一定要逗号分割，否则会出现{"status":"0","info":"UNKNOWN_ERROR","infocode":"20003"}的错误，无法获取到数据
     * @param parameters
     * @return
     */
    Map<String, String> getGeographyInverseCoding(List<InverseCodingParams> parameters) throws ExecutionException, InterruptedException;


    /**
     * 批量手动转换坐标
     */
    void convertLocationTest();

    /**
     * 标准坐标(gps)转换为高德坐标
     * @param parameters
     * @return
     * @throws ExecutionException
     * @throws InterruptedException
     */
    Map<String, String> convertLocation(List<ConvertLocationParams> parameters) throws ExecutionException, InterruptedException;

    /**
     * 获取坐标和电子围栏的关系
     * @param sid
     * @param location
     * @param gfids
     * @param page
     * @param pagesize
     * @return
     */
    FenceRelationResult getFenceRelation(String sid, String location, String gfids, Integer page, Integer pagesize);

    /**
     * 获取坐标和电子围栏的关系
     * @param location
     * @param gfids
     * @param page
     * @param pagesize
     * @return
     */
    FenceRelationResult getFenceRelation(String location, String gfids, Integer page, Integer pagesize);

    /***
     * 创建修改圆形围栏
     * @param geoFence
     * @return
     * @throws Exception
     */
    GeoFenceApiResult addOrUpdateCircle(GeoFence geoFence)throws Exception;
    /***
     * 创建修改多边形围栏
     * @param geoFence
     * @return
     * @throws Exception
     */
    GeoFenceApiResult addOrUpdatePolygon(GeoFence geoFence) throws Exception;
    /***
     * 删除围栏
     * @param geoFence
     * @return
     * @throws Exception
     */
    GeoFenceApiResult delete(GeoFence geoFence) throws Exception;
    /**
     * 查询围栏
     * @param geoFence
     * @return
     * @throws Exception
     */
    GeoFenceApiResult list(GeoFence geoFence) throws Exception;

}
